﻿using QLBH.DATA;
using QLBH.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace QLBH.BUSINESS
{
    public class NhomSanPhamBus
    {
        private static NhomSanPhamData db = new NhomSanPhamData();
        public static List<NHOM_SAN_PHAM> TimNhomSanPhamTheoTen(string ten_nhom_san_pham, int tong_so_dong)
        {
            return db.TimNhomSanPhamTheoTen(ten_nhom_san_pham, tong_so_dong);
        }

        public static string ThemMoi(NHOMSANPHAMPARAM NHOM)
        {
            if (db.ThemMoi(NHOM))
            {
                return "1";
            }
            else
                return db.Error;
        }

        public static string CapNhat(NHOMSANPHAMPARAM NHOM)
        {
            if (db.CapNhat(NHOM))
            {
                return "1";
            }
            else
                return db.Error;
        }

        public static string Xoa(string[] MA_NHOM_SAN_PHAM)
        {
            if (db.Xoa(MA_NHOM_SAN_PHAM))
            {
                return "1";
            }
            else
                return db.Error;
        }

    }
}